/**
 * Created by Freeman on 2016/8/8.
 */
import {TAG_LIST_SUCCESS,TAG_LIST_FAILURE} from '../constants/ActionTypes'
const initialState = [];

export default function tagList(state=initialState,action={}) {
    switch (action.type){
        case TAG_LIST_SUCCESS:
            return [...state,...action.json.data];
        case TAG_LIST_FAILURE:
            return state;
        default :
            return state;
    }
}